#pragma once
#ifdef _WINDOWS  //64位系统没有预定义 WIN32
#ifdef __cplusplus
#define DLL_EXPORT_C_DECL extern "C" __declspec(dllexport)
#else
#define DLL_EXPORT_DECL __declspec(dllexport)
#endif
#else
#ifdef __cplusplus
#define DLL_EXPORT_C_DECL extern "C"
#else
#define DLL_EXPORT_DECL extern
#endif
#endif

#ifdef _WINDOWS
#ifdef WIN32
#define WINAPI      __cdecl
#else
#define WINAPI      __stdcall
#endif
#define WIN32_LEAN_AND_MEAN             //  从 Windows 头文件中排除极少使用的信息
#include "stddef.h"
#include "../riskapi_64/FtdcRiskUserApi.h"
#pragma comment(lib, "../riskapi_64/riskuserapi.lib")
#else
#define WINAPI
#include "../riskapi_64/FtdcRiskUserApi.h"
#endif

#include <string.h>

class Trade: CShfeFtdcRiskUserSpi
{
public:
    Trade(void);
    //针对收到空反馈的处理
    CShfeFtdcRspInfoField rif;
    CShfeFtdcRspInfoField* repare(CShfeFtdcRspInfoField *pRspInfo)
    {
        if (pRspInfo == NULL)
        {
            memset(&rif, 0, sizeof(rif));
            return &rif;
        }
        else
            return pRspInfo;
    }

	///当客户端与交易后台建立起通信连接时（还未登录前），该方法被调用。
	typedef int (WINAPI *FrontConnected)();
	void *_FrontConnected;
	virtual void OnFrontConnected(){if (_FrontConnected) ((FrontConnected)_FrontConnected)();}

	///当客户端与交易后台通信连接断开时，该方法被调用。当发生这个情况后，API会自动重新连接，客户端可不做处理。
		///@param nReason 错误原因
		///        0x1001 网络读失败
		///        0x1002 网络写失败
		///        0x2001 接收心跳超时
		///        0x2002 发送心跳失败
		///        0x2003 收到错误报文
	typedef int (WINAPI *FrontDisconnected)(int nReason);
	void *_FrontDisconnected;
	virtual void OnFrontDisconnected(int nReason){if (_FrontDisconnected) ((FrontDisconnected)_FrontDisconnected)(nReason);}

	///心跳超时警告。当长时间未收到报文时，该方法被调用。
		///@param nTimeLapse 距离上次接收报文的时间
	typedef int (WINAPI *HeartBeatWarning)(int nTimeLapse);
	void *_HeartBeatWarning;
	virtual void OnHeartBeatWarning(int nTimeLapse){if (_HeartBeatWarning) ((HeartBeatWarning)_HeartBeatWarning)(nTimeLapse);}

	///错误应答
	typedef int (WINAPI *RspError)(CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspError;
	virtual void OnRspError(CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspError) ((RspError)_RspError)(repare(pRspInfo), nRequestID, bIsLast);}

	///席位资金回报
	typedef int (WINAPI *RtnBrokerDeposit)(CShfeFtdcBrokerDepositField *pBrokerDeposit);
	void *_RtnBrokerDeposit;
	virtual void OnRtnBrokerDeposit(CShfeFtdcBrokerDepositField *pBrokerDeposit){if (_RtnBrokerDeposit) ((RtnBrokerDeposit)_RtnBrokerDeposit)(pBrokerDeposit);}

	///投资者信息摘要
	typedef int (WINAPI *RtnInvestorSumInfo)(CShfeFtdcInvestorSumInfoField *pInvestorSumInfo);
	void *_RtnInvestorSumInfo;
	virtual void OnRtnInvestorSumInfo(CShfeFtdcInvestorSumInfoField *pInvestorSumInfo){if (_RtnInvestorSumInfo) ((RtnInvestorSumInfo)_RtnInvestorSumInfo)(pInvestorSumInfo);}

	///客户端结算组数据同步开始
	typedef int (WINAPI *RtnClientSGDataSyncStart)(CShfeFtdcSettlementSessionField *pSettlementSession);
	void *_RtnClientSGDataSyncStart;
	virtual void OnRtnClientSGDataSyncStart(CShfeFtdcSettlementSessionField *pSettlementSession){if (_RtnClientSGDataSyncStart) ((RtnClientSGDataSyncStart)_RtnClientSGDataSyncStart)(pSettlementSession);}

	///客户端结算组数据同步结束
	typedef int (WINAPI *RtnClientSGDataSyncEnd)(CShfeFtdcSettlementSessionField *pSettlementSession);
	void *_RtnClientSGDataSyncEnd;
	virtual void OnRtnClientSGDataSyncEnd(CShfeFtdcSettlementSessionField *pSettlementSession){if (_RtnClientSGDataSyncEnd) ((RtnClientSGDataSyncEnd)_RtnClientSGDataSyncEnd)(pSettlementSession);}

	///登录请求响应
	typedef int (WINAPI *RspRiskUserLogin)(CShfeFtdcRspRiskUserLoginField *pRspRiskUserLogin, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspRiskUserLogin;
	virtual void OnRspRiskUserLogin(CShfeFtdcRspRiskUserLoginField *pRspRiskUserLogin, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspRiskUserLogin) ((RspRiskUserLogin)_RspRiskUserLogin)(pRspRiskUserLogin, repare(pRspInfo), nRequestID, bIsLast);}

	///
	typedef int (WINAPI *RspQryInvestorMarginRate)(CShfeFtdcInvestorMarginRateField *pInvestorMarginRate, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspQryInvestorMarginRate;
	virtual void OnRspQryInvestorMarginRate(CShfeFtdcInvestorMarginRateField *pInvestorMarginRate, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspQryInvestorMarginRate) ((RspQryInvestorMarginRate)_RspQryInvestorMarginRate)(pInvestorMarginRate, repare(pRspInfo), nRequestID, bIsLast);}

	///产品信息
	typedef int (WINAPI *RtnProduct)(CShfeFtdcProductField *pProduct);
	void *_RtnProduct;
	virtual void OnRtnProduct(CShfeFtdcProductField *pProduct){if (_RtnProduct) ((RtnProduct)_RtnProduct)(pProduct);}

	///合约信息
	typedef int (WINAPI *RtnInstrument)(CShfeFtdcInstrumentField *pInstrument);
	void *_RtnInstrument;
	virtual void OnRtnInstrument(CShfeFtdcInstrumentField *pInstrument){if (_RtnInstrument) ((RtnInstrument)_RtnInstrument)(pInstrument);}

	///查询报单排名应答
	typedef int (WINAPI *RspQryOrderStat)(CShfeFtdcOrderStatField *pOrderStat, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspQryOrderStat;
	virtual void OnRspQryOrderStat(CShfeFtdcOrderStatField *pOrderStat, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspQryOrderStat) ((RspQryOrderStat)_RspQryOrderStat)(pOrderStat, repare(pRspInfo), nRequestID, bIsLast);}

	///交易所的基本信息
	typedef int (WINAPI *RtnExchange)(CShfeFtdcExchangeField *pExchange);
	void *_RtnExchange;
	virtual void OnRtnExchange(CShfeFtdcExchangeField *pExchange){if (_RtnExchange) ((RtnExchange)_RtnExchange)(pExchange);}

	///投资者持仓统计查询应答-ReqInvestorPosition, ftd version 6 deprecated
	typedef int (WINAPI *RspInvestorPositionStatic)(CShfeFtdcInvestorPositionStaticField *pInvestorPositionStatic, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspInvestorPositionStatic;
	virtual void OnRspInvestorPositionStatic(CShfeFtdcInvestorPositionStaticField *pInvestorPositionStatic, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspInvestorPositionStatic) ((RspInvestorPositionStatic)_RspInvestorPositionStatic)(pInvestorPositionStatic, repare(pRspInfo), nRequestID, bIsLast);}

	///投资者成交统计查询应答-ReqInvestorTrade, ftd version 6 deprecated
	typedef int (WINAPI *RspInvestorTradeStatic)(CShfeFtdcInvestorTradeStaticField *pInvestorTradeStatic, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspInvestorTradeStatic;
	virtual void OnRspInvestorTradeStatic(CShfeFtdcInvestorTradeStaticField *pInvestorTradeStatic, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspInvestorTradeStatic) ((RspInvestorTradeStatic)_RspInvestorTradeStatic)(pInvestorTradeStatic, repare(pRspInfo), nRequestID, bIsLast);}

	///风控深度行情通知
	typedef int (WINAPI *RtnRiskDepthMarketData)(CShfeFtdcDepthMarketDataField *pDepthMarketData);
	void *_RtnRiskDepthMarketData;
	virtual void OnRtnRiskDepthMarketData(CShfeFtdcDepthMarketDataField *pDepthMarketData){if (_RtnRiskDepthMarketData) ((RtnRiskDepthMarketData)_RtnRiskDepthMarketData)(pDepthMarketData);}

	///时间同步
	typedef int (WINAPI *RtnTimeSync)(CShfeFtdcCurrentTimeField *pCurrentTime);
	void *_RtnTimeSync;
	virtual void OnRtnTimeSync(CShfeFtdcCurrentTimeField *pCurrentTime){if (_RtnTimeSync) ((RtnTimeSync)_RtnTimeSync)(pCurrentTime);}

	///合约持仓比例应答
	typedef int (WINAPI *RspInstPositionRate)(CShfeFtdcRspInstPositionRateField *pRspInstPositionRate, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspInstPositionRate;
	virtual void OnRspInstPositionRate(CShfeFtdcRspInstPositionRateField *pRspInstPositionRate, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspInstPositionRate) ((RspInstPositionRate)_RspInstPositionRate)(pRspInstPositionRate, repare(pRspInfo), nRequestID, bIsLast);}

	///产品持仓比例应答
	typedef int (WINAPI *RspProductPositionRate)(CShfeFtdcRspProductPositionRateField *pRspProductPositionRate, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspProductPositionRate;
	virtual void OnRspProductPositionRate(CShfeFtdcRspProductPositionRateField *pRspProductPositionRate, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspProductPositionRate) ((RspProductPositionRate)_RspProductPositionRate)(pRspProductPositionRate, repare(pRspInfo), nRequestID, bIsLast);}

	///查询交易编码Hash值应答
	typedef int (WINAPI *RspQryTradingCodeHash)(CShfeFtdcInvestorHashField *pInvestorHash, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspQryTradingCodeHash;
	virtual void OnRspQryTradingCodeHash(CShfeFtdcInvestorHashField *pInvestorHash, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspQryTradingCodeHash) ((RspQryTradingCodeHash)_RspQryTradingCodeHash)(pInvestorHash, repare(pRspInfo), nRequestID, bIsLast);}

	///查询交易编码应答
	typedef int (WINAPI *RspQryTradingCode)(CShfeFtdcTradingCodeField *pTradingCode, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspQryTradingCode;
	virtual void OnRspQryTradingCode(CShfeFtdcTradingCodeField *pTradingCode, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspQryTradingCode) ((RspQryTradingCode)_RspQryTradingCode)(pTradingCode, repare(pRspInfo), nRequestID, bIsLast);}

	///交易编码回报
	typedef int (WINAPI *RtnTradingCode)(CShfeFtdcTradingCodeField *pTradingCode);
	void *_RtnTradingCode;
	virtual void OnRtnTradingCode(CShfeFtdcTradingCodeField *pTradingCode){if (_RtnTradingCode) ((RtnTradingCode)_RtnTradingCode)(pTradingCode);}

	///删除交易编码回报
	typedef int (WINAPI *RtnDelTradingCode)(CShfeFtdcTradingCodeField *pTradingCode);
	void *_RtnDelTradingCode;
	virtual void OnRtnDelTradingCode(CShfeFtdcTradingCodeField *pTradingCode){if (_RtnDelTradingCode) ((RtnDelTradingCode)_RtnDelTradingCode)(pTradingCode);}

	///有序的经纪公司用户事件回报，对应订阅请求ReqSubBrokerUserEvent
	typedef int (WINAPI *RtnSequencialBrokerUserEvent)(CShfeFtdcSequencialBrokerUserEventField *pSequencialBrokerUserEvent);
	void *_RtnSequencialBrokerUserEvent;
	virtual void OnRtnSequencialBrokerUserEvent(CShfeFtdcSequencialBrokerUserEventField *pSequencialBrokerUserEvent){if (_RtnSequencialBrokerUserEvent) ((RtnSequencialBrokerUserEvent)_RtnSequencialBrokerUserEvent)(pSequencialBrokerUserEvent);}

	///有序的成交回报，对应订阅请求ReqSubscribeTrade
	typedef int (WINAPI *RtnSequencialTrade)(CShfeFtdcSequencialTradeField *pSequencialTrade);
	void *_RtnSequencialTrade;
	virtual void OnRtnSequencialTrade(CShfeFtdcSequencialTradeField *pSequencialTrade){if (_RtnSequencialTrade) ((RtnSequencialTrade)_RtnSequencialTrade)(pSequencialTrade);}

	///有序的报单回报，对应订阅请求ReqSubscribeOrder
	typedef int (WINAPI *RtnSequencialOrder)(CShfeFtdcSequencialOrderField *pSequencialOrder);
	void *_RtnSequencialOrder;
	virtual void OnRtnSequencialOrder(CShfeFtdcSequencialOrderField *pSequencialOrder){if (_RtnSequencialOrder) ((RtnSequencialOrder)_RtnSequencialOrder)(pSequencialOrder);}

	///风控报单录入请求响应
	typedef int (WINAPI *RspRiskOrderInsert)(CShfeFtdcInputOrderField *pInputOrder, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspRiskOrderInsert;
	virtual void OnRspRiskOrderInsert(CShfeFtdcInputOrderField *pInputOrder, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspRiskOrderInsert) ((RspRiskOrderInsert)_RspRiskOrderInsert)(pInputOrder, repare(pRspInfo), nRequestID, bIsLast);}

	///风控报单操作请求响应
	typedef int (WINAPI *RspRiskOrderAction)(CShfeFtdcInputOrderActionField *pInputOrderAction, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspRiskOrderAction;
	virtual void OnRspRiskOrderAction(CShfeFtdcInputOrderActionField *pInputOrderAction, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspRiskOrderAction) ((RspRiskOrderAction)_RspRiskOrderAction)(pInputOrderAction, repare(pRspInfo), nRequestID, bIsLast);}

	///有序的持仓回报，对应订阅请求ReqSubscribePosition
	typedef int (WINAPI *RtnSequencialPosition)(CShfeFtdcSequencialPositionField *pSequencialPosition);
	void *_RtnSequencialPosition;
	virtual void OnRtnSequencialPosition(CShfeFtdcSequencialPositionField *pSequencialPosition){if (_RtnSequencialPosition) ((RtnSequencialPosition)_RtnSequencialPosition)(pSequencialPosition);}

	///客户风险通知发送命令应答
	typedef int (WINAPI *RspRiskNotifyCommand)(CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspRiskNotifyCommand;
	virtual void OnRspRiskNotifyCommand(CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspRiskNotifyCommand) ((RspRiskNotifyCommand)_RspRiskNotifyCommand)(repare(pRspInfo), nRequestID, bIsLast);}

	///批量强平计算请求应答
	typedef int (WINAPI *RspBatchForceCloseCalc)(CShfeFtdcRspForceClosePositionField *pRspForceClosePosition, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspBatchForceCloseCalc;
	virtual void OnRspBatchForceCloseCalc(CShfeFtdcRspForceClosePositionField *pRspForceClosePosition, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspBatchForceCloseCalc) ((RspBatchForceCloseCalc)_RspBatchForceCloseCalc)(pRspForceClosePosition, repare(pRspInfo), nRequestID, bIsLast);}

	///单个投资者强平计算请求应答
	typedef int (WINAPI *RspForceCloseCalc)(CShfeFtdcRspForceClosePositionField *pRspForceClosePosition, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspForceCloseCalc;
	virtual void OnRspForceCloseCalc(CShfeFtdcRspForceClosePositionField *pRspForceClosePosition, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspForceCloseCalc) ((RspForceCloseCalc)_RspForceCloseCalc)(pRspForceClosePosition, repare(pRspInfo), nRequestID, bIsLast);}

	///净持仓保证金指标参数设置应答
	typedef int (WINAPI *RspSetIndexNPPParam)(CShfeFtdcIndexNPPParamField *pIndexNPPParam, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspSetIndexNPPParam;
	virtual void OnRspSetIndexNPPParam(CShfeFtdcIndexNPPParamField *pIndexNPPParam, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspSetIndexNPPParam) ((RspSetIndexNPPParam)_RspSetIndexNPPParam)(pIndexNPPParam, repare(pRspInfo), nRequestID, bIsLast);}

	///净持仓保证金指标回报；如删除指标，则使用RtnDelIndexNPP
	typedef int (WINAPI *RtnIndexNPP)(CShfeFtdcIndexNPPField *pIndexNPP);
	void *_RtnIndexNPP;
	virtual void OnRtnIndexNPP(CShfeFtdcIndexNPPField *pIndexNPP){if (_RtnIndexNPP) ((RtnIndexNPP)_RtnIndexNPP)(pIndexNPP);}

	///删除净持仓保证金指标参数应答
	typedef int (WINAPI *RspRemIndexNPPParam)(CShfeFtdcIndexNPPParamField *pIndexNPPParam, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspRemIndexNPPParam;
	virtual void OnRspRemIndexNPPParam(CShfeFtdcIndexNPPParamField *pIndexNPPParam, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspRemIndexNPPParam) ((RspRemIndexNPPParam)_RspRemIndexNPPParam)(pIndexNPPParam, repare(pRspInfo), nRequestID, bIsLast);}

	///强平计算请求资金账户应答
	typedef int (WINAPI *RspForceCloseAccount)(CShfeFtdcInvestorRiskAccountField *pInvestorRiskAccount, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspForceCloseAccount;
	virtual void OnRspForceCloseAccount(CShfeFtdcInvestorRiskAccountField *pInvestorRiskAccount, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspForceCloseAccount) ((RspForceCloseAccount)_RspForceCloseAccount)(pInvestorRiskAccount, repare(pRspInfo), nRequestID, bIsLast);}

	///查询登陆请求应答
	typedef int (WINAPI *RspQryLogin)(CShfeFtdcNormalRiskQueryField *pNormalRiskQuery, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspQryLogin;
	virtual void OnRspQryLogin(CShfeFtdcNormalRiskQueryField *pNormalRiskQuery, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspQryLogin) ((RspQryLogin)_RspQryLogin)(pNormalRiskQuery, repare(pRspInfo), nRequestID, bIsLast);}

	///查询安全价格波动范围应答
	typedef int (WINAPI *RspQrySafePriceRange)(CShfeFtdcSafePriceRangeField *pSafePriceRange, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspQrySafePriceRange;
	virtual void OnRspQrySafePriceRange(CShfeFtdcSafePriceRangeField *pSafePriceRange, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspQrySafePriceRange) ((RspQrySafePriceRange)_RspQrySafePriceRange)(pSafePriceRange, repare(pRspInfo), nRequestID, bIsLast);}

	///查询安全价格波动范围资金应答
	typedef int (WINAPI *RspQrySafePriceRangeAccount)(CShfeFtdcInvestorRiskAccountField *pInvestorRiskAccount, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspQrySafePriceRangeAccount;
	virtual void OnRspQrySafePriceRangeAccount(CShfeFtdcInvestorRiskAccountField *pInvestorRiskAccount, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspQrySafePriceRangeAccount) ((RspQrySafePriceRangeAccount)_RspQrySafePriceRangeAccount)(pInvestorRiskAccount, repare(pRspInfo), nRequestID, bIsLast);}

	///查询价格波动对投资者风险的影响应答
	typedef int (WINAPI *RspQryPriceVaryEffect)(CShfeFtdcPriceVaryParamField *pPriceVaryParam, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspQryPriceVaryEffect;
	virtual void OnRspQryPriceVaryEffect(CShfeFtdcPriceVaryParamField *pPriceVaryParam, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspQryPriceVaryEffect) ((RspQryPriceVaryEffect)_RspQryPriceVaryEffect)(pPriceVaryParam, repare(pRspInfo), nRequestID, bIsLast);}

	///组织架构
	typedef int (WINAPI *RtnDepartment)(CShfeFtdcDepartmentField *pDepartment);
	void *_RtnDepartment;
	virtual void OnRtnDepartment(CShfeFtdcDepartmentField *pDepartment){if (_RtnDepartment) ((RtnDepartment)_RtnDepartment)(pDepartment);}

	///IndexNPP应答，净持仓保证金指标强平计算功能使用
	typedef int (WINAPI *RspIndexNPP)(CShfeFtdcIndexNPPField *pIndexNPP, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspIndexNPP;
	virtual void OnRspIndexNPP(CShfeFtdcIndexNPPField *pIndexNPP, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspIndexNPP) ((RspIndexNPP)_RspIndexNPP)(pIndexNPP, repare(pRspInfo), nRequestID, bIsLast);}

	///交易系统参数
	typedef int (WINAPI *RtnTradeParam)(CShfeFtdcTradeParamField *pTradeParam);
	void *_RtnTradeParam;
	virtual void OnRtnTradeParam(CShfeFtdcTradeParamField *pTradeParam){if (_RtnTradeParam) ((RtnTradeParam)_RtnTradeParam)(pTradeParam);}

	///风控预埋单录入应答
	typedef int (WINAPI *RspRiskParkedOrderInsert)(CShfeFtdcRiskParkedOrderField *pRiskParkedOrder, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspRiskParkedOrderInsert;
	virtual void OnRspRiskParkedOrderInsert(CShfeFtdcRiskParkedOrderField *pRiskParkedOrder, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspRiskParkedOrderInsert) ((RspRiskParkedOrderInsert)_RspRiskParkedOrderInsert)(pRiskParkedOrder, repare(pRspInfo), nRequestID, bIsLast);}

	///删除预埋单响应
	typedef int (WINAPI *RspRemoveRiskParkedOrder)(CShfeFtdcRemoveRiskParkedOrderField *pRemoveRiskParkedOrder, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspRemoveRiskParkedOrder;
	virtual void OnRspRemoveRiskParkedOrder(CShfeFtdcRemoveRiskParkedOrderField *pRemoveRiskParkedOrder, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspRemoveRiskParkedOrder) ((RspRemoveRiskParkedOrder)_RspRemoveRiskParkedOrder)(pRemoveRiskParkedOrder, repare(pRspInfo), nRequestID, bIsLast);}

	///有序的风控预埋单回报
	typedef int (WINAPI *RtnSeqRiskParkedOrder)(CShfeFtdcSeqRiskParkedOrderField *pSeqRiskParkedOrder);
	void *_RtnSeqRiskParkedOrder;
	virtual void OnRtnSeqRiskParkedOrder(CShfeFtdcSeqRiskParkedOrderField *pSeqRiskParkedOrder){if (_RtnSeqRiskParkedOrder) ((RtnSeqRiskParkedOrder)_RtnSeqRiskParkedOrder)(pSeqRiskParkedOrder);}

	///风控用户密码修改应答
	typedef int (WINAPI *RspRiskUserPasswordUpd)(CShfeFtdcUserPasswordUpdateField *pUserPasswordUpdate, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspRiskUserPasswordUpd;
	virtual void OnRspRiskUserPasswordUpd(CShfeFtdcUserPasswordUpdateField *pUserPasswordUpdate, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspRiskUserPasswordUpd) ((RspRiskUserPasswordUpd)_RspRiskUserPasswordUpd)(pUserPasswordUpdate, repare(pRspInfo), nRequestID, bIsLast);}

	///有序的出入金回报，对应订阅请求ReqSubSeqDeposit
	typedef int (WINAPI *RtnSeqDeposit)(CShfeFtdcSeqDepositField *pSeqDeposit);
	void *_RtnSeqDeposit;
	virtual void OnRtnSeqDeposit(CShfeFtdcSeqDepositField *pSeqDeposit){if (_RtnSeqDeposit) ((RtnSeqDeposit)_RtnSeqDeposit)(pSeqDeposit);}

	///插入风控用户事件应答
	typedef int (WINAPI *RspAddRiskUserEvent)(CShfeFtdcRiskUserEventField *pRiskUserEvent, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspAddRiskUserEvent;
	virtual void OnRspAddRiskUserEvent(CShfeFtdcRiskUserEventField *pRiskUserEvent, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspAddRiskUserEvent) ((RspAddRiskUserEvent)_RspAddRiskUserEvent)(pRiskUserEvent, repare(pRspInfo), nRequestID, bIsLast);}

	///风险预算资金应答
	typedef int (WINAPI *RspQryPredictRiskAccount)(CShfeFtdcPredictRiskAccountField *pPredictRiskAccount, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspQryPredictRiskAccount;
	virtual void OnRspQryPredictRiskAccount(CShfeFtdcPredictRiskAccountField *pPredictRiskAccount, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspQryPredictRiskAccount) ((RspQryPredictRiskAccount)_RspQryPredictRiskAccount)(pPredictRiskAccount, repare(pRspInfo), nRequestID, bIsLast);}

	///风险预算持仓应答
	typedef int (WINAPI *RspQryPredictRiskPosition)(CShfeFtdcPredictRiskPositionField *pPredictRiskPosition, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspQryPredictRiskPosition;
	virtual void OnRspQryPredictRiskPosition(CShfeFtdcPredictRiskPositionField *pPredictRiskPosition, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspQryPredictRiskPosition) ((RspQryPredictRiskPosition)_RspQryPredictRiskPosition)(pPredictRiskPosition, repare(pRspInfo), nRequestID, bIsLast);}

	///投资者基础信息回报，只同步盘中变化数据，可以配合{ReqQryInvestorLinkMan,RspQryInvestorLinkMan}使用
	typedef int (WINAPI *RtnRiskInvestor)(CShfeFtdcRiskSyncInvestorField *pRiskSyncInvestor);
	void *_RtnRiskInvestor;
	virtual void OnRtnRiskInvestor(CShfeFtdcRiskSyncInvestorField *pRiskSyncInvestor){if (_RtnRiskInvestor) ((RtnRiskInvestor)_RtnRiskInvestor)(pRiskSyncInvestor);}

	///查询投资者和联系人信息应答
	typedef int (WINAPI *RspQryInvestorLinkMan)(CShfeFtdcInvestorLinkManField *pInvestorLinkMan, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspQryInvestorLinkMan;
	virtual void OnRspQryInvestorLinkMan(CShfeFtdcInvestorLinkManField *pInvestorLinkMan, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspQryInvestorLinkMan) ((RspQryInvestorLinkMan)_RspQryInvestorLinkMan)(pInvestorLinkMan, repare(pRspInfo), nRequestID, bIsLast);}

	///查询组织架构投资者对应关系应答
	typedef int (WINAPI *RspQryInvestorDepartment)(CShfeFtdcInvestorDepartmentFlatField *pInvestorDepartmentFlat, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspQryInvestorDepartment;
	virtual void OnRspQryInvestorDepartment(CShfeFtdcInvestorDepartmentFlatField *pInvestorDepartmentFlat, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspQryInvestorDepartment) ((RspQryInvestorDepartment)_RspQryInvestorDepartment)(pInvestorDepartmentFlat, repare(pRspInfo), nRequestID, bIsLast);}

	///删除净持仓保证金指标回报，与RtnIndexNPP对应
	typedef int (WINAPI *RtnDelIndexNPP)(CShfeFtdcIndexNPPField *pIndexNPP);
	void *_RtnDelIndexNPP;
	virtual void OnRtnDelIndexNPP(CShfeFtdcIndexNPPField *pIndexNPP){if (_RtnDelIndexNPP) ((RtnDelIndexNPP)_RtnDelIndexNPP)(pIndexNPP);}

	///风控用户权限回报
	typedef int (WINAPI *RtnRiskUserFunction)(CShfeFtdcRiskUserFunctionField *pRiskUserFunction);
	void *_RtnRiskUserFunction;
	virtual void OnRtnRiskUserFunction(CShfeFtdcRiskUserFunctionField *pRiskUserFunction){if (_RtnRiskUserFunction) ((RtnRiskUserFunction)_RtnRiskUserFunction)(pRiskUserFunction);}

	///删除风控用户权限回报
	typedef int (WINAPI *RtnDelRiskUserFunction)(CShfeFtdcRiskUserFunctionField *pRiskUserFunction);
	void *_RtnDelRiskUserFunction;
	virtual void OnRtnDelRiskUserFunction(CShfeFtdcRiskUserFunctionField *pRiskUserFunction){if (_RtnDelRiskUserFunction) ((RtnDelRiskUserFunction)_RtnDelRiskUserFunction)(pRiskUserFunction);}

	///投资者当日资金回报；昨日资金使用{ReqSubPreRiskAccount,RtnSeqPreRiskAccount}
	typedef int (WINAPI *RtnRiskSyncAccount)(CShfeFtdcRiskSyncAccountField *pRiskSyncAccount);
	void *_RtnRiskSyncAccount;
	virtual void OnRtnRiskSyncAccount(CShfeFtdcRiskSyncAccountField *pRiskSyncAccount){if (_RtnRiskSyncAccount) ((RtnRiskSyncAccount)_RtnRiskSyncAccount)(pRiskSyncAccount);}

	///有序的昨日资金回报，对应订阅请求ReqSubPreRiskAccount
	typedef int (WINAPI *RtnSeqPreRiskAccount)(CShfeFtdcSeqPreRiskAccountField *pSeqPreRiskAccount);
	void *_RtnSeqPreRiskAccount;
	virtual void OnRtnSeqPreRiskAccount(CShfeFtdcSeqPreRiskAccountField *pSeqPreRiskAccount){if (_RtnSeqPreRiskAccount) ((RtnSeqPreRiskAccount)_RtnSeqPreRiskAccount)(pSeqPreRiskAccount);}

	///模板替换字段回报
	typedef int (WINAPI *RtnNoticeToken)(CShfeFtdcNoticeTokenField *pNoticeToken);
	void *_RtnNoticeToken;
	virtual void OnRtnNoticeToken(CShfeFtdcNoticeTokenField *pNoticeToken){if (_RtnNoticeToken) ((RtnNoticeToken)_RtnNoticeToken)(pNoticeToken);}

	///通知模板回报
	typedef int (WINAPI *RtnNoticePattern)(CShfeFtdcNoticePatternField *pNoticePattern);
	void *_RtnNoticePattern;
	virtual void OnRtnNoticePattern(CShfeFtdcNoticePatternField *pNoticePattern){if (_RtnNoticePattern) ((RtnNoticePattern)_RtnNoticePattern)(pNoticePattern);}

	///更新通知模版应答
	typedef int (WINAPI *RspModNoticePattern)(CShfeFtdcNoticePatternField *pNoticePattern, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspModNoticePattern;
	virtual void OnRspModNoticePattern(CShfeFtdcNoticePatternField *pNoticePattern, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspModNoticePattern) ((RspModNoticePattern)_RspModNoticePattern)(pNoticePattern, repare(pRspInfo), nRequestID, bIsLast);}

	///变化行情回报，目前只订阅最新价
	typedef int (WINAPI *RtnVaryMarketData)(CShfeFtdcVaryMarketDataField *pVaryMarketData);
	void *_RtnVaryMarketData;
	virtual void OnRtnVaryMarketData(CShfeFtdcVaryMarketDataField *pVaryMarketData){if (_RtnVaryMarketData) ((RtnVaryMarketData)_RtnVaryMarketData)(pVaryMarketData);}

	///新增风险通知应答
	typedef int (WINAPI *RspAddRiskNotifyA)(CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspAddRiskNotifyA;
	virtual void OnRspAddRiskNotifyA(CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspAddRiskNotifyA) ((RspAddRiskNotifyA)_RspAddRiskNotifyA)(repare(pRspInfo), nRequestID, bIsLast);}

	///新增业务通知应答
	typedef int (WINAPI *RspAddBizNotice)(CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspAddBizNotice;
	virtual void OnRspAddBizNotice(CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspAddBizNotice) ((RspAddBizNotice)_RspAddBizNotice)(repare(pRspInfo), nRequestID, bIsLast);}

	///有序的业务通知回报
	typedef int (WINAPI *RtnSeqBizNotice)(CShfeFtdcSeqBizNoticeField *pSeqBizNotice);
	void *_RtnSeqBizNotice;
	virtual void OnRtnSeqBizNotice(CShfeFtdcSeqBizNoticeField *pSeqBizNotice){if (_RtnSeqBizNotice) ((RtnSeqBizNotice)_RtnSeqBizNotice)(pSeqBizNotice);}

	///查询席位资金应答
	typedef int (WINAPI *RspRiskQryBrokerDeposit)(CShfeFtdcQueryBrokerDepositField *pQueryBrokerDeposit, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspRiskQryBrokerDeposit;
	virtual void OnRspRiskQryBrokerDeposit(CShfeFtdcQueryBrokerDepositField *pQueryBrokerDeposit, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspRiskQryBrokerDeposit) ((RspRiskQryBrokerDeposit)_RspRiskQryBrokerDeposit)(pQueryBrokerDeposit, repare(pRspInfo), nRequestID, bIsLast);}

	///风控参数信息回报
	typedef int (WINAPI *RtnRiskParamInfo)(CShfeFtdcRiskParamInfoField *pRiskParamInfo);
	void *_RtnRiskParamInfo;
	virtual void OnRtnRiskParamInfo(CShfeFtdcRiskParamInfoField *pRiskParamInfo){if (_RtnRiskParamInfo) ((RtnRiskParamInfo)_RtnRiskParamInfo)(pRiskParamInfo);}

	///修改投资者参数应答
	typedef int (WINAPI *RspModRiskInvestorParam)(CShfeFtdcRiskInvestorParamField *pRiskInvestorParam, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspModRiskInvestorParam;
	virtual void OnRspModRiskInvestorParam(CShfeFtdcRiskInvestorParamField *pRiskInvestorParam, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspModRiskInvestorParam) ((RspModRiskInvestorParam)_RspModRiskInvestorParam)(pRiskInvestorParam, repare(pRspInfo), nRequestID, bIsLast);}

	///删除投资者参数应答
	typedef int (WINAPI *RspRemRiskInvestorParam)(CShfeFtdcRiskInvestorParamField *pRiskInvestorParam, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspRemRiskInvestorParam;
	virtual void OnRspRemRiskInvestorParam(CShfeFtdcRiskInvestorParamField *pRiskInvestorParam, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspRemRiskInvestorParam) ((RspRemRiskInvestorParam)_RspRemRiskInvestorParam)(pRiskInvestorParam, repare(pRspInfo), nRequestID, bIsLast);}

	///投资者参数回报
	typedef int (WINAPI *RtnRiskInvestorParam)(CShfeFtdcRiskInvestorParamField *pRiskInvestorParam);
	void *_RtnRiskInvestorParam;
	virtual void OnRtnRiskInvestorParam(CShfeFtdcRiskInvestorParamField *pRiskInvestorParam){if (_RtnRiskInvestorParam) ((RtnRiskInvestorParam)_RtnRiskInvestorParam)(pRiskInvestorParam);}

	///删除投资者参数回报
	typedef int (WINAPI *RtnDelRiskInvestorParam)(CShfeFtdcRiskInvestorParamField *pRiskInvestorParam);
	void *_RtnDelRiskInvestorParam;
	virtual void OnRtnDelRiskInvestorParam(CShfeFtdcRiskInvestorParamField *pRiskInvestorParam){if (_RtnDelRiskInvestorParam) ((RtnDelRiskInvestorParam)_RtnDelRiskInvestorParam)(pRiskInvestorParam);}

	///强制风控用户登出应答
	typedef int (WINAPI *RspForceRiskUserLogout)(CShfeFtdcRiskLoginInfoField *pRiskLoginInfo, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspForceRiskUserLogout;
	virtual void OnRspForceRiskUserLogout(CShfeFtdcRiskLoginInfoField *pRiskLoginInfo, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspForceRiskUserLogout) ((RspForceRiskUserLogout)_RspForceRiskUserLogout)(pRiskLoginInfo, repare(pRspInfo), nRequestID, bIsLast);}

	///强制风控用户登出回报
	typedef int (WINAPI *RtnForceRiskUserLogout)(CShfeFtdcRiskLoginInfoField *pRiskLoginInfo);
	void *_RtnForceRiskUserLogout;
	virtual void OnRtnForceRiskUserLogout(CShfeFtdcRiskLoginInfoField *pRiskLoginInfo){if (_RtnForceRiskUserLogout) ((RtnForceRiskUserLogout)_RtnForceRiskUserLogout)(pRiskLoginInfo);}

	///增加风控通知模板应答
	typedef int (WINAPI *RspAddRiskPattern)(CShfeFtdcRiskPatternField *pRiskPattern, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspAddRiskPattern;
	virtual void OnRspAddRiskPattern(CShfeFtdcRiskPatternField *pRiskPattern, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspAddRiskPattern) ((RspAddRiskPattern)_RspAddRiskPattern)(pRiskPattern, repare(pRspInfo), nRequestID, bIsLast);}

	///修改风控通知模板应答
	typedef int (WINAPI *RspModRiskPattern)(CShfeFtdcRiskPatternField *pRiskPattern, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspModRiskPattern;
	virtual void OnRspModRiskPattern(CShfeFtdcRiskPatternField *pRiskPattern, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspModRiskPattern) ((RspModRiskPattern)_RspModRiskPattern)(pRiskPattern, repare(pRspInfo), nRequestID, bIsLast);}

	///删除风控通知模板应答
	typedef int (WINAPI *RspRemRiskPattern)(CShfeFtdcRiskPatternField *pRiskPattern, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspRemRiskPattern;
	virtual void OnRspRemRiskPattern(CShfeFtdcRiskPatternField *pRiskPattern, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspRemRiskPattern) ((RspRemRiskPattern)_RspRemRiskPattern)(pRiskPattern, repare(pRspInfo), nRequestID, bIsLast);}

	///风控通知模板回报
	typedef int (WINAPI *RtnRiskPattern)(CShfeFtdcRiskPatternField *pRiskPattern);
	void *_RtnRiskPattern;
	virtual void OnRtnRiskPattern(CShfeFtdcRiskPatternField *pRiskPattern){if (_RtnRiskPattern) ((RtnRiskPattern)_RtnRiskPattern)(pRiskPattern);}

	///删除风控通知模板回报
	typedef int (WINAPI *RtnDelRiskPattern)(CShfeFtdcRiskPatternField *pRiskPattern);
	void *_RtnDelRiskPattern;
	virtual void OnRtnDelRiskPattern(CShfeFtdcRiskPatternField *pRiskPattern){if (_RtnDelRiskPattern) ((RtnDelRiskPattern)_RtnDelRiskPattern)(pRiskPattern);}

	///增加投资者通知模板应答
	typedef int (WINAPI *RspAddInvestorPattern)(CShfeFtdcInvestorPatternField *pInvestorPattern, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspAddInvestorPattern;
	virtual void OnRspAddInvestorPattern(CShfeFtdcInvestorPatternField *pInvestorPattern, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspAddInvestorPattern) ((RspAddInvestorPattern)_RspAddInvestorPattern)(pInvestorPattern, repare(pRspInfo), nRequestID, bIsLast);}

	///修改投资者通知模板应答
	typedef int (WINAPI *RspModInvestorPattern)(CShfeFtdcInvestorPatternField *pInvestorPattern, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspModInvestorPattern;
	virtual void OnRspModInvestorPattern(CShfeFtdcInvestorPatternField *pInvestorPattern, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspModInvestorPattern) ((RspModInvestorPattern)_RspModInvestorPattern)(pInvestorPattern, repare(pRspInfo), nRequestID, bIsLast);}

	///删除投资者通知模板应答
	typedef int (WINAPI *RspRemInvestorPattern)(CShfeFtdcInvestorPatternField *pInvestorPattern, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspRemInvestorPattern;
	virtual void OnRspRemInvestorPattern(CShfeFtdcInvestorPatternField *pInvestorPattern, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspRemInvestorPattern) ((RspRemInvestorPattern)_RspRemInvestorPattern)(pInvestorPattern, repare(pRspInfo), nRequestID, bIsLast);}

	///投资者通知模板回报
	typedef int (WINAPI *RtnInvestorPattern)(CShfeFtdcInvestorPatternField *pInvestorPattern);
	void *_RtnInvestorPattern;
	virtual void OnRtnInvestorPattern(CShfeFtdcInvestorPatternField *pInvestorPattern){if (_RtnInvestorPattern) ((RtnInvestorPattern)_RtnInvestorPattern)(pInvestorPattern);}

	///删除投资者通知模板回报
	typedef int (WINAPI *RtnDelInvestorPattern)(CShfeFtdcInvestorPatternField *pInvestorPattern);
	void *_RtnDelInvestorPattern;
	virtual void OnRtnDelInvestorPattern(CShfeFtdcInvestorPatternField *pInvestorPattern){if (_RtnDelInvestorPattern) ((RtnDelInvestorPattern)_RtnDelInvestorPattern)(pInvestorPattern);}

	///风险通知模板自动替换字段回报
	typedef int (WINAPI *RtnRiskNotifyToken)(CShfeFtdcRiskNotifyTokenField *pRiskNotifyToken);
	void *_RtnRiskNotifyToken;
	virtual void OnRtnRiskNotifyToken(CShfeFtdcRiskNotifyTokenField *pRiskNotifyToken){if (_RtnRiskNotifyToken) ((RtnRiskNotifyToken)_RtnRiskNotifyToken)(pRiskNotifyToken);}

	///有序的风险通知回报版本B，对应订阅请求ReqSubSeqRiskNotifyB
	typedef int (WINAPI *RtnSeqRiskNotifyB)(CShfeFtdcSeqRiskNotifyBField *pSeqRiskNotifyB);
	void *_RtnSeqRiskNotifyB;
	virtual void OnRtnSeqRiskNotifyB(CShfeFtdcSeqRiskNotifyBField *pSeqRiskNotifyB){if (_RtnSeqRiskNotifyB) ((RtnSeqRiskNotifyB)_RtnSeqRiskNotifyB)(pSeqRiskNotifyB);}

	///查询持仓排名应答
	typedef int (WINAPI *RspQryPositionStat)(CShfeFtdcPositionStatField *pPositionStat, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspQryPositionStat;
	virtual void OnRspQryPositionStat(CShfeFtdcPositionStatField *pPositionStat, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspQryPositionStat) ((RspQryPositionStat)_RspQryPositionStat)(pPositionStat, repare(pRspInfo), nRequestID, bIsLast);}

	///查询成交排名应答
	typedef int (WINAPI *RspQryTradeStat)(CShfeFtdcTradeStatField *pTradeStat, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspQryTradeStat;
	virtual void OnRspQryTradeStat(CShfeFtdcTradeStatField *pTradeStat, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspQryTradeStat) ((RspQryTradeStat)_RspQryTradeStat)(pTradeStat, repare(pRspInfo), nRequestID, bIsLast);}

	///投资者及联系人信息哈希值查询应答
	typedef int (WINAPI *RspQryInvestorLinkManHash)(CShfeFtdcInvestorHashField *pInvestorHash, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspQryInvestorLinkManHash;
	virtual void OnRspQryInvestorLinkManHash(CShfeFtdcInvestorHashField *pInvestorHash, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspQryInvestorLinkManHash) ((RspQryInvestorLinkManHash)_RspQryInvestorLinkManHash)(pInvestorHash, repare(pRspInfo), nRequestID, bIsLast);}

	///查询投资者组织架构Hash值应答
	typedef int (WINAPI *RspQryInvestorDepartmentHash)(CShfeFtdcInvestorHashField *pInvestorHash, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspQryInvestorDepartmentHash;
	virtual void OnRspQryInvestorDepartmentHash(CShfeFtdcInvestorHashField *pInvestorHash, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspQryInvestorDepartmentHash) ((RspQryInvestorDepartmentHash)_RspQryInvestorDepartmentHash)(pInvestorHash, repare(pRspInfo), nRequestID, bIsLast);}

	///压力测试应答
	typedef int (WINAPI *RspQryStressTest)(CShfeFtdcInvestorRiskAccountField *pInvestorRiskAccount, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspQryStressTest;
	virtual void OnRspQryStressTest(CShfeFtdcInvestorRiskAccountField *pInvestorRiskAccount, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspQryStressTest) ((RspQryStressTest)_RspQryStressTest)(pInvestorRiskAccount, repare(pRspInfo), nRequestID, bIsLast);}

	///查询低保投资者hash值应答
	typedef int (WINAPI *RspQryLowMarginInvestorHash)(CShfeFtdcInvestorHashField *pInvestorHash, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspQryLowMarginInvestorHash;
	virtual void OnRspQryLowMarginInvestorHash(CShfeFtdcInvestorHashField *pInvestorHash, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspQryLowMarginInvestorHash) ((RspQryLowMarginInvestorHash)_RspQryLowMarginInvestorHash)(pInvestorHash, repare(pRspInfo), nRequestID, bIsLast);}

	///查询低保投资者应答
	typedef int (WINAPI *RspQryLowMarginInvestor)(CShfeFtdcBrokerInvestorField *pBrokerInvestor, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspQryLowMarginInvestor;
	virtual void OnRspQryLowMarginInvestor(CShfeFtdcBrokerInvestorField *pBrokerInvestor, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspQryLowMarginInvestor) ((RspQryLowMarginInvestor)_RspQryLowMarginInvestor)(pBrokerInvestor, repare(pRspInfo), nRequestID, bIsLast);}

	///低保投资者回报
	typedef int (WINAPI *RtnLowMarginInvestor)(CShfeFtdcBrokerInvestorField *pBrokerInvestor);
	void *_RtnLowMarginInvestor;
	virtual void OnRtnLowMarginInvestor(CShfeFtdcBrokerInvestorField *pBrokerInvestor){if (_RtnLowMarginInvestor) ((RtnLowMarginInvestor)_RtnLowMarginInvestor)(pBrokerInvestor);}

	///删除低保投资者回报
	typedef int (WINAPI *RtnDelLowMarginInvestor)(CShfeFtdcBrokerInvestorField *pBrokerInvestor);
	void *_RtnDelLowMarginInvestor;
	virtual void OnRtnDelLowMarginInvestor(CShfeFtdcBrokerInvestorField *pBrokerInvestor){if (_RtnDelLowMarginInvestor) ((RtnDelLowMarginInvestor)_RtnDelLowMarginInvestor)(pBrokerInvestor);}

	///有序的短信自定义通知回报，对应订阅请求ReqSubSeqData
	typedef int (WINAPI *RtnSeqSmsCustomNotify)(CShfeFtdcSeqSmsCustomNotifyField *pSeqSmsCustomNotify);
	void *_RtnSeqSmsCustomNotify;
	virtual void OnRtnSeqSmsCustomNotify(CShfeFtdcSeqSmsCustomNotifyField *pSeqSmsCustomNotify){if (_RtnSeqSmsCustomNotify) ((RtnSeqSmsCustomNotify)_RtnSeqSmsCustomNotify)(pSeqSmsCustomNotify);}

	///设置短信通知状态应答
	typedef int (WINAPI *RspSetSmsStatus)(CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspSetSmsStatus;
	virtual void OnRspSetSmsStatus(CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspSetSmsStatus) ((RspSetSmsStatus)_RspSetSmsStatus)(repare(pRspInfo), nRequestID, bIsLast);}

	///投资者交易所保证金率回报
	typedef int (WINAPI *RspQryExchMarginRate)(CShfeFtdcExchMarginRateField *pExchMarginRate, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspQryExchMarginRate;
	virtual void OnRspQryExchMarginRate(CShfeFtdcExchMarginRateField *pExchMarginRate, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspQryExchMarginRate) ((RspQryExchMarginRate)_RspQryExchMarginRate)(pExchMarginRate, repare(pRspInfo), nRequestID, bIsLast);}

	///投资者手续费率回报
	typedef int (WINAPI *RspReqQryCommissionRate)(CShfeFtdcInstrumentCommissionRateField *pInstrumentCommissionRate, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspReqQryCommissionRate;
	virtual void OnRspReqQryCommissionRate(CShfeFtdcInstrumentCommissionRateField *pInstrumentCommissionRate, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspReqQryCommissionRate) ((RspReqQryCommissionRate)_RspReqQryCommissionRate)(pInstrumentCommissionRate, repare(pRspInfo), nRequestID, bIsLast);}

	///有序的产品组保证金,对应订阅请求ReqSubSeqData
	typedef int (WINAPI *RtnSeqIPGroupMargin)(CShfeFtdcSeqIPGroupMarginField *pSeqIPGroupMargin);
	void *_RtnSeqIPGroupMargin;
	virtual void OnRtnSeqIPGroupMargin(CShfeFtdcSeqIPGroupMarginField *pSeqIPGroupMargin){if (_RtnSeqIPGroupMargin) ((RtnSeqIPGroupMargin)_RtnSeqIPGroupMargin)(pSeqIPGroupMargin);}

	///查询二代投资者hash值应答
	typedef int (WINAPI *RspQrySecAgentInvestorHash)(CShfeFtdcInvestorHashField *pInvestorHash, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspQrySecAgentInvestorHash;
	virtual void OnRspQrySecAgentInvestorHash(CShfeFtdcInvestorHashField *pInvestorHash, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspQrySecAgentInvestorHash) ((RspQrySecAgentInvestorHash)_RspQrySecAgentInvestorHash)(pInvestorHash, repare(pRspInfo), nRequestID, bIsLast);}

	///查询二代投资者应答
	typedef int (WINAPI *RspQrySecAgentInvestor)(CShfeFtdcSecAgentInvestorField *pSecAgentInvestor, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspQrySecAgentInvestor;
	virtual void OnRspQrySecAgentInvestor(CShfeFtdcSecAgentInvestorField *pSecAgentInvestor, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspQrySecAgentInvestor) ((RspQrySecAgentInvestor)_RspQrySecAgentInvestor)(pSecAgentInvestor, repare(pRspInfo), nRequestID, bIsLast);}

	///二代投资者回报
	typedef int (WINAPI *RtnSecAgentInvestor)(CShfeFtdcSecAgentInvestorField *pSecAgentInvestor);
	void *_RtnSecAgentInvestor;
	virtual void OnRtnSecAgentInvestor(CShfeFtdcSecAgentInvestorField *pSecAgentInvestor){if (_RtnSecAgentInvestor) ((RtnSecAgentInvestor)_RtnSecAgentInvestor)(pSecAgentInvestor);}

	///删除二代投资者回报
	typedef int (WINAPI *RtnDelSecAgentInvestor)(CShfeFtdcSecAgentInvestorField *pSecAgentInvestor);
	void *_RtnDelSecAgentInvestor;
	virtual void OnRtnDelSecAgentInvestor(CShfeFtdcSecAgentInvestorField *pSecAgentInvestor){if (_RtnDelSecAgentInvestor) ((RtnDelSecAgentInvestor)_RtnDelSecAgentInvestor)(pSecAgentInvestor);}

	///产品报价汇率信息
	typedef int (WINAPI *RtnProductExchangeRate)(CShfeFtdcProductExchRateField *pProductExchRate);
	void *_RtnProductExchangeRate;
	virtual void OnRtnProductExchangeRate(CShfeFtdcProductExchRateField *pProductExchRate){if (_RtnProductExchangeRate) ((RtnProductExchangeRate)_RtnProductExchangeRate)(pProductExchRate);}

	///风控请求查询期权合约手续费响应
	typedef int (WINAPI *RspQryOptionInstrCommRate)(CShfeFtdcOptionInstrCommRateField *pOptionInstrCommRate, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspQryOptionInstrCommRate;
	virtual void OnRspQryOptionInstrCommRate(CShfeFtdcOptionInstrCommRateField *pOptionInstrCommRate, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspQryOptionInstrCommRate) ((RspQryOptionInstrCommRate)_RspQryOptionInstrCommRate)(pOptionInstrCommRate, repare(pRspInfo), nRequestID, bIsLast);}

	///风控请求查询做市商期权合约手续费响应
	typedef int (WINAPI *RspQryMMOptionInstrCommRate)(CShfeFtdcMMOptionInstrCommRateField *pMMOptionInstrCommRate, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspQryMMOptionInstrCommRate;
	virtual void OnRspQryMMOptionInstrCommRate(CShfeFtdcMMOptionInstrCommRateField *pMMOptionInstrCommRate, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspQryMMOptionInstrCommRate) ((RspQryMMOptionInstrCommRate)_RspQryMMOptionInstrCommRate)(pMMOptionInstrCommRate, repare(pRspInfo), nRequestID, bIsLast);}

	///风控请求查询执行宣告响应
	typedef int (WINAPI *RspQryExecOrder)(CShfeFtdcRiskExecOrderField *pRiskExecOrder, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspQryExecOrder;
	virtual void OnRspQryExecOrder(CShfeFtdcRiskExecOrderField *pRiskExecOrder, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspQryExecOrder) ((RspQryExecOrder)_RspQryExecOrder)(pRiskExecOrder, repare(pRspInfo), nRequestID, bIsLast);}

	///风控查询交易用户登录统计信息响应
	typedef int (WINAPI *RspQryLogUserLoginStat)(CShfeFtdcRiskLogUserLoginStatField *pRiskLogUserLoginStat, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspQryLogUserLoginStat;
	virtual void OnRspQryLogUserLoginStat(CShfeFtdcRiskLogUserLoginStatField *pRiskLogUserLoginStat, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspQryLogUserLoginStat) ((RspQryLogUserLoginStat)_RspQryLogUserLoginStat)(pRiskLogUserLoginStat, repare(pRspInfo), nRequestID, bIsLast);}

	///风控查询交易用户登录信息响应
	typedef int (WINAPI *RspQryLogUserLoginInfo)(CShfeFtdcRiskLogUserLoginInfoField *pRiskLogUserLoginInfo, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspQryLogUserLoginInfo;
	virtual void OnRspQryLogUserLoginInfo(CShfeFtdcRiskLogUserLoginInfoField *pRiskLogUserLoginInfo, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspQryLogUserLoginInfo) ((RspQryLogUserLoginInfo)_RspQryLogUserLoginInfo)(pRiskLogUserLoginInfo, repare(pRspInfo), nRequestID, bIsLast);}

	///风控查询期权合约希腊值应答
	typedef int (WINAPI *RspQryInstrumentGreeks)(CShfeFtdcRiskInstrumentGreeksField *pRiskInstrumentGreeks, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspQryInstrumentGreeks;
	virtual void OnRspQryInstrumentGreeks(CShfeFtdcRiskInstrumentGreeksField *pRiskInstrumentGreeks, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspQryInstrumentGreeks) ((RspQryInstrumentGreeks)_RspQryInstrumentGreeks)(pRiskInstrumentGreeks, repare(pRspInfo), nRequestID, bIsLast);}

	///行权试算应答
	typedef int (WINAPI *RspQryExeciseTest)(CShfeFtdcInvestorTestResultField *pInvestorTestResult, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspQryExeciseTest;
	virtual void OnRspQryExeciseTest(CShfeFtdcInvestorTestResultField *pInvestorTestResult, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspQryExeciseTest) ((RspQryExeciseTest)_RspQryExeciseTest)(pInvestorTestResult, repare(pRspInfo), nRequestID, bIsLast);}

	///投资者交易中心代码查询应答
	typedef int (WINAPI *RspQryUserRightsAssign)(CShfeFtdcUserRightsAssignField *pUserRightsAssign, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspQryUserRightsAssign;
	virtual void OnRspQryUserRightsAssign(CShfeFtdcUserRightsAssignField *pUserRightsAssign, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspQryUserRightsAssign) ((RspQryUserRightsAssign)_RspQryUserRightsAssign)(pUserRightsAssign, repare(pRspInfo), nRequestID, bIsLast);}

	///主交易中心代码查询应答
	typedef int (WINAPI *RspQryCurrDRIdentity)(CShfeFtdcCurrDRIdentityField *pCurrDRIdentity, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspQryCurrDRIdentity;
	virtual void OnRspQryCurrDRIdentity(CShfeFtdcCurrDRIdentityField *pCurrDRIdentity, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspQryCurrDRIdentity) ((RspQryCurrDRIdentity)_RspQryCurrDRIdentity)(pCurrDRIdentity, repare(pRspInfo), nRequestID, bIsLast);}

	///二级代理商综合账户查询查询应答
	typedef int (WINAPI *RspQrySecAgentTradingAccount)(CShfeFtdcInvestorRiskAccountField *pInvestorRiskAccount, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspQrySecAgentTradingAccount;
	virtual void OnRspQrySecAgentTradingAccount(CShfeFtdcInvestorRiskAccountField *pInvestorRiskAccount, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspQrySecAgentTradingAccount) ((RspQrySecAgentTradingAccount)_RspQrySecAgentTradingAccount)(pInvestorRiskAccount, repare(pRspInfo), nRequestID, bIsLast);}

	///请求查询延时换汇响应
	typedef int (WINAPI *RspQrySyncDelaySwap)(CShfeFtdcSyncDelaySwapField *pSyncDelaySwap, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspQrySyncDelaySwap;
	virtual void OnRspQrySyncDelaySwap(CShfeFtdcSyncDelaySwapField *pSyncDelaySwap, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspQrySyncDelaySwap) ((RspQrySyncDelaySwap)_RspQrySyncDelaySwap)(pSyncDelaySwap, repare(pRspInfo), nRequestID, bIsLast);}

	///请求查询二级代理商资金校验模式响应
	typedef int (WINAPI *RspQrySecAgentCheckMode)(CShfeFtdcSecAgentCheckModeField *pSecAgentCheckMode, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
	void *_RspQrySecAgentCheckMode;
	virtual void OnRspQrySecAgentCheckMode(CShfeFtdcSecAgentCheckModeField *pSecAgentCheckMode, CShfeFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast){if (_RspQrySecAgentCheckMode) ((RspQrySecAgentCheckMode)_RspQrySecAgentCheckMode)(pSecAgentCheckMode, repare(pRspInfo), nRequestID, bIsLast);}

	///二级代理商资金校验模式同步
	typedef int (WINAPI *RtnSecAgentCheckMode)(CShfeFtdcSecAgentCheckModeField *pSecAgentCheckMode);
	void *_RtnSecAgentCheckMode;
	virtual void OnRtnSecAgentCheckMode(CShfeFtdcSecAgentCheckModeField *pSecAgentCheckMode){if (_RtnSecAgentCheckMode) ((RtnSecAgentCheckMode)_RtnSecAgentCheckMode)(pSecAgentCheckMode);}
};
